3.352 \(\int (f x)^{-1+m} (d+e x^m)^2 (a+b \log (c x^n)) \, dx\)

Optimal. Leaf size=142 \[ \frac {x^{1-m} (f x)^{m-1} \left (d+e x^m\right )^3 \left (a+b \log \left (c x^n\right )\right )}{3 e m}-\frac {b d^3 n x^{1-m} \log (x) (f x)^{m-1}}{3 e m}-\frac {b d^2 n x (f x)^{m-1}}{m^2}-\frac {b d e n x^{m+1} (f x)^{m-1}}{2 m^2}-\frac {b e^2 n x^{2 m+1} (f x)^{m-1}}{9 m^2} \]

[Out]

-b*d^2*n*x*(f*x)^(-1+m)/m^2-1/2*b*d*e*n*x^(1+m)*(f*x)^(-1+m)/m^2-1/9*b*e^2*n*x^(1+2*m)*(f*x)^(-1+m)/m^2-1/3*b*
d^3*n*x^(1-m)*(f*x)^(-1+m)*ln(x)/e/m+1/3*x^(1-m)*(f*x)^(-1+m)*(d+e*x^m)^3*(a+b*ln(c*x^n))/e/m

________________________________________________________________________________________

Rubi [A]  time = 0.20, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2339, 2338, 266, 43} \[ \frac {x^{1-m} (f x)^{m-1} \left (d+e x^m\right )^3 \left (a+b \log \left (c x^n\right )\right )}{3 e m}-\frac {b d^3 n x^{1-m} \log (x) (f x)^{m-1}}{3 e m}-\frac {b d^2 n x (f x)^{m-1}}{m^2}-\frac {b d e n x^{m+1} (f x)^{m-1}}{2 m^2}-\frac {b e^2 n x^{2 m+1} (f x)^{m-1}}{9 m^2} \]

Antiderivative was successfully verified.

[In]

Int[(f*x)^(-1 + m)*(d + e*x^m)^2*(a + b*Log[c*x^n]),x]

[Out]

-((b*d^2*n*x*(f*x)^(-1 + m))/m^2) - (b*d*e*n*x^(1 + m)*(f*x)^(-1 + m))/(2*m^2) - (b*e^2*n*x^(1 + 2*m)*(f*x)^(-
1 + m))/(9*m^2) - (b*d^3*n*x^(1 - m)*(f*x)^(-1 + m)*Log[x])/(3*e*m) + (x^(1 - m)*(f*x)^(-1 + m)*(d + e*x^m)^3*
(a + b*Log[c*x^n]))/(3*e*m)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_))^(q_.), x_Symbol] :
> Simp[(f^m*(d + e*x^r)^(q + 1)*(a + b*Log[c*x^n])^p)/(e*r*(q + 1)), x] - Dist[(b*f^m*n*p)/(e*r*(q + 1)), Int[
((d + e*x^r)^(q + 1)*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && EqQ[
m, r - 1] && IGtQ[p, 0] && (IntegerQ[m] || GtQ[f, 0]) && NeQ[r, n] && NeQ[q, -1]

Rule 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_))^(q_.), x_Symbol] :>
 Dist[(f*x)^m/x^m, Int[x^m*(d + e*x^r)^q*(a + b*Log[c*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r},
 x] && EqQ[m, r - 1] && IGtQ[p, 0] &&  !(IntegerQ[m] || GtQ[f, 0])

Rubi steps

\begin {align*} \int (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx &=\left (x^{1-m} (f x)^{-1+m}\right ) \int x^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^3 \left (a+b \log \left (c x^n\right )\right )}{3 e m}-\frac {\left (b n x^{1-m} (f x)^{-1+m}\right ) \int \frac {\left (d+e x^m\right )^3}{x} \, dx}{3 e m}\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^3 \left (a+b \log \left (c x^n\right )\right )}{3 e m}-\frac {\left (b n x^{1-m} (f x)^{-1+m}\right ) \operatorname {Subst}\left (\int \frac {(d+e x)^3}{x} \, dx,x,x^m\right )}{3 e m^2}\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^3 \left (a+b \log \left (c x^n\right )\right )}{3 e m}-\frac {\left (b n x^{1-m} (f x)^{-1+m}\right ) \operatorname {Subst}\left (\int \left (3 d^2 e+\frac {d^3}{x}+3 d e^2 x+e^3 x^2\right ) \, dx,x,x^m\right )}{3 e m^2}\\ &=-\frac {b d^2 n x (f x)^{-1+m}}{m^2}-\frac {b d e n x^{1+m} (f x)^{-1+m}}{2 m^2}-\frac {b e^2 n x^{1+2 m} (f x)^{-1+m}}{9 m^2}-\frac {b d^3 n x^{1-m} (f x)^{-1+m} \log (x)}{3 e m}+\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^3 \left (a+b \log \left (c x^n\right )\right )}{3 e m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 101, normalized size = 0.71 \[ \frac {(f x)^m \left (6 a m \left (3 d^2+3 d e x^m+e^2 x^{2 m}\right )+6 b m \log \left (c x^n\right ) \left (3 d^2+3 d e x^m+e^2 x^{2 m}\right )-b n \left (18 d^2+9 d e x^m+2 e^2 x^{2 m}\right )\right )}{18 f m^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(f*x)^(-1 + m)*(d + e*x^m)^2*(a + b*Log[c*x^n]),x]

[Out]

((f*x)^m*(6*a*m*(3*d^2 + 3*d*e*x^m + e^2*x^(2*m)) - b*n*(18*d^2 + 9*d*e*x^m + 2*e^2*x^(2*m)) + 6*b*m*(3*d^2 +
3*d*e*x^m + e^2*x^(2*m))*Log[c*x^n]))/(18*f*m^2)

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 135, normalized size = 0.95 \[ \frac {2 \, {\left (3 \, b e^{2} m n \log \relax (x) + 3 \, b e^{2} m \log \relax (c) + 3 \, a e^{2} m - b e^{2} n\right )} f^{m - 1} x^{3 \, m} + 9 \, {\left (2 \, b d e m n \log \relax (x) + 2 \, b d e m \log \relax (c) + 2 \, a d e m - b d e n\right )} f^{m - 1} x^{2 \, m} + 18 \, {\left (b d^{2} m n \log \relax (x) + b d^{2} m \log \relax (c) + a d^{2} m - b d^{2} n\right )} f^{m - 1} x^{m}}{18 \, m^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(d+e*x^m)^2*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

1/18*(2*(3*b*e^2*m*n*log(x) + 3*b*e^2*m*log(c) + 3*a*e^2*m - b*e^2*n)*f^(m - 1)*x^(3*m) + 9*(2*b*d*e*m*n*log(x
) + 2*b*d*e*m*log(c) + 2*a*d*e*m - b*d*e*n)*f^(m - 1)*x^(2*m) + 18*(b*d^2*m*n*log(x) + b*d^2*m*log(c) + a*d^2*
m - b*d^2*n)*f^(m - 1)*x^m)/m^2

________________________________________________________________________________________

giac [A]  time = 0.74, size = 257, normalized size = 1.81 \[ \frac {b d^{2} \frac {1}{f}^{m} x^{m} {\left | f \right |}^{2 \, m} \log \relax (c)}{f m} + \frac {b d^{2} f^{m} n x^{m} \log \relax (x)}{f m} + \frac {b d f^{m} n x^{2 \, m} e \log \relax (x)}{f m} + \frac {a d^{2} \frac {1}{f}^{m} x^{m} {\left | f \right |}^{2 \, m}}{f m} + \frac {b d f^{m} x^{2 \, m} e \log \relax (c)}{f m} + \frac {b f^{m} n x^{3 \, m} e^{2} \log \relax (x)}{3 \, f m} - \frac {b d^{2} f^{m} n x^{m}}{f m^{2}} + \frac {a d f^{m} x^{2 \, m} e}{f m} - \frac {b d f^{m} n x^{2 \, m} e}{2 \, f m^{2}} + \frac {b f^{m} x^{3 \, m} e^{2} \log \relax (c)}{3 \, f m} + \frac {a f^{m} x^{3 \, m} e^{2}}{3 \, f m} - \frac {b f^{m} n x^{3 \, m} e^{2}}{9 \, f m^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(d+e*x^m)^2*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

b*d^2*(1/f)^m*x^m*abs(f)^(2*m)*log(c)/(f*m) + b*d^2*f^m*n*x^m*log(x)/(f*m) + b*d*f^m*n*x^(2*m)*e*log(x)/(f*m)
+ a*d^2*(1/f)^m*x^m*abs(f)^(2*m)/(f*m) + b*d*f^m*x^(2*m)*e*log(c)/(f*m) + 1/3*b*f^m*n*x^(3*m)*e^2*log(x)/(f*m)
 - b*d^2*f^m*n*x^m/(f*m^2) + a*d*f^m*x^(2*m)*e/(f*m) - 1/2*b*d*f^m*n*x^(2*m)*e/(f*m^2) + 1/3*b*f^m*x^(3*m)*e^2
*log(c)/(f*m) + 1/3*a*f^m*x^(3*m)*e^2/(f*m) - 1/9*b*f^m*n*x^(3*m)*e^2/(f*m^2)

________________________________________________________________________________________

maple [C]  time = 0.25, size = 616, normalized size = 4.34 \[ \frac {\left (3 d e \,x^{m}+e^{2} x^{2 m}+3 d^{2}\right ) b x \,{\mathrm e}^{\frac {\left (m -1\right ) \left (-i \pi \,\mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i f x \right )+i \pi \,\mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i f x \right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i f x \right )^{2}-i \pi \mathrm {csgn}\left (i f x \right )^{3}+2 \ln \relax (f )+2 \ln \relax (x )\right )}{2}} \ln \left (x^{n}\right )}{3 m}+\frac {\left (-9 i \pi b d e m \,x^{m} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+9 i \pi b d e m \,x^{m} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+9 i \pi b d e m \,x^{m} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-9 i \pi b d e m \,x^{m} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-3 i \pi b \,e^{2} m \,x^{2 m} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+3 i \pi b \,e^{2} m \,x^{2 m} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+3 i \pi b \,e^{2} m \,x^{2 m} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-3 i \pi b \,e^{2} m \,x^{2 m} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-9 i \pi b \,d^{2} m \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+9 i \pi b \,d^{2} m \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+9 i \pi b \,d^{2} m \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-9 i \pi b \,d^{2} m \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+18 b d e m \,x^{m} \ln \relax (c )+6 b \,e^{2} m \,x^{2 m} \ln \relax (c )+18 a d e m \,x^{m}+6 a \,e^{2} m \,x^{2 m}+18 b \,d^{2} m \ln \relax (c )-9 b d e n \,x^{m}-2 b \,e^{2} n \,x^{2 m}+18 a \,d^{2} m -18 b \,d^{2} n \right ) x \,{\mathrm e}^{\frac {\left (m -1\right ) \left (-i \pi \,\mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i f x \right )+i \pi \,\mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i f x \right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i f x \right )^{2}-i \pi \mathrm {csgn}\left (i f x \right )^{3}+2 \ln \relax (f )+2 \ln \relax (x )\right )}{2}}}{18 m^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^(m-1)*(d+e*x^m)^2*(b*ln(c*x^n)+a),x)

[Out]

1/3*b*(e^2*(x^m)^2+3*d*e*x^m+3*d^2)*x/m*exp(1/2*(m-1)*(-I*Pi*csgn(I*f)*csgn(I*x)*csgn(I*f*x)+I*Pi*csgn(I*f)*cs
gn(I*f*x)^2+I*Pi*csgn(I*x)*csgn(I*f*x)^2-I*Pi*csgn(I*f*x)^3+2*ln(f)+2*ln(x)))*ln(x^n)+1/18*(9*I*Pi*b*d*e*csgn(
I*x^n)*csgn(I*c*x^n)^2*x^m*m+9*I*Pi*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2*m+9*I*Pi*b*d^2*csgn(I*c*x^n)^2*csgn(I*c)
*m-9*I*Pi*b*d*e*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*x^m*m+9*I*Pi*b*d*e*csgn(I*c*x^n)^2*csgn(I*c)*x^m*m-3*I*Pi*
b*e^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*(x^m)^2*m+3*I*Pi*b*e^2*csgn(I*c*x^n)^2*csgn(I*c)*(x^m)^2*m-9*I*Pi*b*
d*e*csgn(I*c*x^n)^3*x^m*m+3*I*Pi*b*e^2*csgn(I*x^n)*csgn(I*c*x^n)^2*(x^m)^2*m-9*I*Pi*b*d^2*csgn(I*c*x^n)^3*m-9*
I*Pi*b*d^2*m*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-3*I*Pi*b*e^2*csgn(I*c*x^n)^3*(x^m)^2*m+6*ln(c)*b*e^2*(x^m)^2*
m+18*ln(c)*b*d*e*x^m*m+6*a*e^2*(x^m)^2*m-2*b*e^2*n*(x^m)^2+18*b*d^2*m*ln(c)+18*a*d*e*x^m*m-9*b*d*e*n*x^m+18*a*
d^2*m-18*b*d^2*n)*x/m^2*exp(1/2*(m-1)*(-I*Pi*csgn(I*f)*csgn(I*x)*csgn(I*f*x)+I*Pi*csgn(I*f)*csgn(I*f*x)^2+I*Pi
*csgn(I*x)*csgn(I*f*x)^2-I*Pi*csgn(I*f*x)^3+2*ln(f)+2*ln(x)))

________________________________________________________________________________________

maxima [A]  time = 0.70, size = 180, normalized size = 1.27 \[ \frac {b e^{2} f^{m - 1} x^{3 \, m} \log \left (c x^{n}\right )}{3 \, m} + \frac {b d e f^{m - 1} x^{2 \, m} \log \left (c x^{n}\right )}{m} + \frac {a e^{2} f^{m - 1} x^{3 \, m}}{3 \, m} - \frac {b e^{2} f^{m - 1} n x^{3 \, m}}{9 \, m^{2}} + \frac {a d e f^{m - 1} x^{2 \, m}}{m} - \frac {b d e f^{m - 1} n x^{2 \, m}}{2 \, m^{2}} - \frac {b d^{2} f^{m - 1} n x^{m}}{m^{2}} + \frac {\left (f x\right )^{m} b d^{2} \log \left (c x^{n}\right )}{f m} + \frac {\left (f x\right )^{m} a d^{2}}{f m} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(d+e*x^m)^2*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

1/3*b*e^2*f^(m - 1)*x^(3*m)*log(c*x^n)/m + b*d*e*f^(m - 1)*x^(2*m)*log(c*x^n)/m + 1/3*a*e^2*f^(m - 1)*x^(3*m)/
m - 1/9*b*e^2*f^(m - 1)*n*x^(3*m)/m^2 + a*d*e*f^(m - 1)*x^(2*m)/m - 1/2*b*d*e*f^(m - 1)*n*x^(2*m)/m^2 - b*d^2*
f^(m - 1)*n*x^m/m^2 + (f*x)^m*b*d^2*log(c*x^n)/(f*m) + (f*x)^m*a*d^2/(f*m)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (f\,x\right )}^{m-1}\,{\left (d+e\,x^m\right )}^2\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^(m - 1)*(d + e*x^m)^2*(a + b*log(c*x^n)),x)

[Out]

int((f*x)^(m - 1)*(d + e*x^m)^2*(a + b*log(c*x^n)), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)**(-1+m)*(d+e*x**m)**2*(a+b*ln(c*x**n)),x)

[Out]

Timed out

________________________________________________________________________________________